<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<jsp:include page="../header.jsp">
<jsp:param value="我的客户" name="title"/>
</jsp:include>
<link href="static/css/job_follow.css" rel="stylesheet" type="text/css">
<link href="static/css/base-css.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="static/js/jobFollow.js" ></script>
<script type="text/javascript">
$(function(){
	$('#refresh').on('click',function(){
		location.replace("${basePath}${url}");
	});
});
</script>
</head>
<body>
	<jsp:include page="../menu/menue.jsp"></jsp:include>
<div class="teacher-content" style="margin-left: 150px; margin-right: 100px;">
	<table class="ui sortable celled table job">
    <thead>
    <tr>
        <th colspan="${url eq 'job/worked'? '7':'5' }" style="vertical-align:middle">
        	${url eq 'job/worked'? '已就业学员':'已归档学员' }
        	<form action="${url eq 'job/worked'? 'job/worked':'job/file' }">
	    	<div class="ui mini icon input" style="float: right;">
	  			<input type="text" placeholder="请输入名字" name="name" value="${param.name }" >
	  			<input type="text" placeholder="请输入电话" name="phone" value="${param.phone }" >
	  			<button class="ui icon button"> <i class="search icon"></i></button>
			</div>
			</form>
		</th>
    </tr>
    <tr>
		    <th colspan="${url eq 'job/worked'? '7':'5' }">
    		<div class="ui teal basic button" tabindex="0" id="refresh"> 刷新</div>
	    	<c:if test="${url eq 'job/worked' }">
	    	<div class="ui teal basic button" tabindex="0" id="file">归档</div>
	    	</c:if>	
    		<div class="ui buttons" style="float:right;">
				<div class="teal ui  buttons">
					<a class="ui button"  href="job/follow">已毕业</a>
				  	<a class="ui button " href="job/employed">面试中</a>
				 	<a class="${url eq 'job/worked'?'ui button active':'ui button ' }" href="job/worked">已就业</a>
					<a class="${url eq 'job/file'?'ui button active':'ui button ' }" href="job/file">已归档</a>
				</div>
			</div>
    	</th>
    </tr> 
    
      <tr id="tr1">
      <c:if test="${url eq 'job/worked' }">
         <th>
	      	<div class="ui checkbox">
				<input type="checkbox" id="checkAll">
			</div>
		</th>
		</c:if>
        <th>姓名</th>
        <th>公司</th>
        <th>公司地址</th>
        <th>薪资</th>
        <th>电话</th>
      <c:if test="${url eq 'job/worked' }"> 
      	<th>&nbsp;</th>
      </c:if>
      </tr>
    </thead>
    <tbody>
    <c:forEach items="${studentList}" var="stu">
      <tr id="tr2">
      <c:if test="${url eq 'job/worked' }">
        <td>
	      	<div class="ui checkbox">
				<input type="checkbox" class="item-check" value="${stu.id}">
			</div>
		</td>
	</c:if>
        <td>
        <c:if test="${url eq 'job/worked' }">
        <a href = "student/employed?id=${stu.id}">${stu.name}</a>
        </c:if> 
        <c:if test="${url eq 'job/file' }">
        <a href = "student/file?id=${stu.id}">${stu.name}</a>
        </c:if> 
        </td>
        <td>${stu.company }</td>
        <td>${stu.comAddress }</td>
        <td>${stu.salary}</td>
        <td>${stu.phone}</td>
        <c:if test="${url eq 'job/worked' }">
        <td class="negative"><a class="ui teal basic button" tabindex="0" href="job/file?id=${stu.id}" >归档</a></td>
     	</c:if>
      </tr>
      </c:forEach>
      <c:if test="${empty studentList}">
		<tr>
			<td style="text-align: center;" colspan="${url eq 'job/worked' ? '7':'5' }">暂无记录</td>
		</tr>
	  </c:if>
    </tbody>
  </table>
		<c:if test="${totalPage > 1 }">
			<div class="page">
				<a <c:if test="${page!=1}">href="${url}?page=1${queryString}"</c:if>
					class="${page == 1?'disable':''}" style="color:#666"><i class="fast backward icon"></i>首页
				</a>
				<a <c:if test="${page!=1}">href="${url}?page=${page-1}${queryString}"</c:if>
					class="${page == 1?'disable':''}" style="color:#666"><i class="backward icon"></i>上一页
				</a>
				<a <c:if test="${page!=totalPage}">href="${url}?page=${page+1 }${queryString}"</c:if>
					class="${page == totalPage?'disable':''}" style="color:#666">下一页<i class="forward icon"></i>
				</a>
				<a <c:if test="${page!=totalPage}">href="${url}?page=${totalPage }${queryString}"</c:if>
					class="${page == totalPage?'disable':''}" style="color:#666">尾页<i class="fast forward icon"></i>
				</a>
				<span style="float:right" >${page}/${totalPage }</span>
					
			</div>
		</c:if>
  </div>
</body>
</html>